import request from "@/api/index"

export default{
  /**
   * @description: 添加摄像头 *代表必填
   * @param {Object} params *
   * @return {Object}
   */
   add(params){
    const url = "/iot/camera/add"
    return request.post(url,params)
  },
  /**
   * @description: 批量添加摄像头 *代表必填
   * @param {Object} params *
   * @return {Object}
   */
  addList(params){
    const url = "/iot/camera/addList"
    return request.post(url,params)
  },
  /**
   * @description: 修改摄像头 *代表必填
   * @param {Object} params *
   * @return {Object}
   */
   edit(params){
    const url = "/iot/camera/edit"
    return request.post(url,params)
  },
  /**
   * @description: 单个删除摄像头 *代表必填
   * @param {String/Number} id *
   * @return {Object}
   */
   delById(params){
    const url = "/iot/camera/delById"
    return request.get(url,params)
  },
  /**
   * @description: 单个删除摄像头 *代表必填
   * @param {String/Number} id *
   * @return {Object}
   */
  delListById(params){
    const url = "/iot/camera/delListById"
    return request.get(url,params)
  },
  /**
   * @description: 单个删除摄像头 *代表必填
   * @param {String/Number} id *
   * @return {Object}
   */
  queryByFishPondId(params){
    const url = "/iot/camera/queryByFishPondId"
    return request.get(url,params)
  },
  /**
   * @description: 条件查询 *代表必填
   * @param {Object} params *
   * @return {Object}
   */
  queryByCondition(params){
    const url = "/iot/camera/queryByCondition"
    return request.post(url,params)
  },
  /**
   * @description: 分页查询摄像头 *代表必填
   * @param {Object} params *
   * @param {String/Number} page *
   * @param {String/Number} size *
   * @return {Object}
   */
   queryPageByCondition(params){
    const url = "/iot/camera/queryPageByCondition"
    return request.post(url,params)
  },
  /**
   * @description: 标识查询接口 *代表必填
   * @param {String/Number} id *
   * @return {Object}
   */
  queryByCompanyMark(){
    const url = "/iot/platformCamera/queryByCompanyMark"
    return request.get(url,{
      companyMark:sessionStorage.getItem("companyMark")
    })
  },
  /**
   * @description: 批量查询接口 *代表必填
   * @return {Object}
   */
  queryList(){
    const url = "/iot/platformCamera/queryList"
    return request.get(url)
  },
  /**
   * @description: 设备绑定摄像头 *代表必填
   * @param {Object} params *
   * @return {Object}
   */
  addCameraToEquipment(params){
    const url = "/iot/equipmentCameraMapper/addCameraToEquipment"
    return request.post(url,params)
  },
  /**
   * @description: 根据鱼塘Id查询摄像头 *代表必填
   * @param {Object} params *
   * @return {Object}
   */
  queryByEquipmentId(params){
    const url = "/iot/equipmentCameraMapper/queryByEquipmentId"
    return request.get(url,params)
  },
}
